package game.gui;

/**
 * This class creates a window telling who won and ends the game.
 * It is called by the controller when someone has won.
 * @author Kristen
 */


import game.player.Player;
import game.utils.Util;

import java.awt.GridLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;

public class PlayerWonGUI extends JFrame{
	

	private static final long serialVersionUID = 1L;
		JLabel text; 

		public PlayerWonGUI(Player p){
			super(Util.GAME_OVER);
			setSize(300, 200);
			setDefaultCloseOperation(EXIT_ON_CLOSE);
			setVisible(true);
			text=new JLabel("   "+ p.getName()+" has won!");
			add(text);
		}
}
